{if $full_page eq 1}
<!DOCTYPE html>
<html>
  <head>
    {include file='html_header.htm'}
    <script type="text/javascript">
        function open_surplus()
        {
           $('#hidebg').css('height',$(document).height());
           $('#hidebg').css('display','block');
           $('#popup_window').css('display','block');
        }
        
        function close_surplus()
        {
           $('#hidebg').css('display','none');
           $('#popup_window').css('display','none');
        }
      
        function quick_delivery()
        {
          if($.trim($('#express_no').val()) == '')
          {
            $.zalert.add('请输入快递单号！',1);
            return false;
          }
          else
          {
            return true;
          }
        }
    </script> 
  </head>
  <body>
    <div id='container'>
      {/if}
      <!-- 显示购货人信息 start -->
      <div id="hidebg" onclick='close_surplus()'></div>
      <div id="popup_window" style="position:fixed;display:none;">
        <a class='close' onclick="close_surplus()"></a>
        <div class="buyer">
          <h4>购货人信息</h4>
          <div class="info">
            <table width="100%" >
              <tr>
                <td width="30%">电子邮件：</td>
                <td><a href='mailto:{$user.email}' class='phone'>{$user.email}</a></td>
              </tr>
              <tr>
                <td>账户余额：</td>
                <td>{$user.user_money}</td>
              </tr>
              <tr>
                <td>消费积分：</td>
                <td>{$user.pay_points}</td>
              </tr>
              <tr>
                <td>等级积分：</td>
                <td>{$user.rank_points}</td>
              </tr>
              <tr>
                <td>会员等级：</td>
                <td>{$user.rank_name}</td>
              </tr>
              <tr>
                <td>红包数量：</td>
                <td>{$user.bonus_count}</td>
              </tr>
            </table>
          </div>
          <div class="info">
          {foreach from=$address_list item=address}
  <table width="100%" border="0">
    <caption><strong> {$lang.consignee} : {$address.consignee|escape} </strong></caption>
    <tr>
      <td> {$lang.email} </td>
      <td> <a href="mailto:{$address.email|escape}">{$address.email|escape}</a> </td>
    </tr>
    <tr>
      <td> {$lang.address} </td>
      <td> {$address.address|escape} </td>
    </tr>
    <tr>
      <td> {$lang.zipcode} </td>
      <td> {$address.zipcode|escape} </td>
    </tr>
    <tr>
      <td> {$lang.tel} </td>
      <td> {$address.tel|escape} </td>
    </tr>
    <tr>
      <td> {$lang.mobile} </td>
      <td> {$address.mobile|escape} </td>
    </tr>
  </table>
  {/foreach}
          </div>
        </div>
      </div>
      {include file='page_header.htm'}
      <section style="padding-bottom:90px;">
         {if $order.pay_status == 2 && $order.shipping_status != 1 && $order.order_status == 1 }
        <form method='POST' action='order.php' onsubmit='return quick_delivery();'>
          <div class="order_info_con">
            <p class="one_delivery">
              <input type="text" name="express_no" id='express_no' placeholder="请输入快递单号" class="inputBg"/>
              <input type='hidden' name='order_id' value='{$order.order_id}'/>
			  <input type='hidden' name='act' value='quick_delivery'/>
              <input type="submit" value="一键发货" class="one_delivery_btn" />
			  
            </p>
          </div>
        </form>
        {/if}
        <div class="order_info_con">
          <div class="order_fee">
            <p class="edit" id="order_fee" onclick='$(".fee_info").slideToggle()'><span>费用信息<a href="order.php?act=edit&order_id={$order.order_id}&step=money" class="special">编辑</a></span> <i></i></p>
            <div class="fee_info">
              <p>商品总金额：{$order.formated_goods_amount} - 折扣：{$order.formated_discount} + 发票税额：{$order.formated_tax} + 配送费用：{$order.formated_shipping_fee} + 保价费用：{$order.formated_insure_fee} + 支付费用：{$order.formated_pay_fee} + 包装费用：{$order.formated_pack_fee} + 贺卡费用：{$order.formated_card_fee}</p>
              <p>= 订单总金额：{$order.formated_total_fee}</p>
              <p>- 已付款金额：{$order.formated_money_paid} - 使用余额： {$order.formated_surplus} - 使用积分： {$order.formated_integral_money} - 使用红包： {$order.formated_bonus}</p>
            </div>
            <p class="order_amount">= {if $order.order_amount >= 0}应付款金额：{$order.formated_order_amount}{else}应退款金额：{$order.formated_money_refund}{/if}</p>
          </div>
          <div class="consignee_info">
            <p class="edit"><span>收货人信息<a href="order.php?act=edit&order_id={$order.order_id}&step=consignee" class="special">编辑</a></span></p>
            <div class="order_consign">
              <table width="100%" >
                <tr>
                  <td>收货人：{$order.consignee}</td>
                  <td><a href="tel:{$order.mobile}" class="phone">{$order.mobile}</a></td>
                </tr>
                <tr>
                  <td colspan="2">地址：{$order.country_name}&nbsp;{$order.city_name}&nbsp;{$order.district_name}&nbsp;{$order.address}<a href='navigate.php?act=navigate&order_id={$order.order_id}' target='_blank'><img src='images/location.png' style='height:15px;'/></a>&nbsp;&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="2">最佳送货时间：{$order.best_time}</td>
                </tr>
              </table>
            </div>
          </div>
          <div class="goods_info">
            <p class="edit"><span>商品信息</span></p>
            <div class="order_goods">
              {if $goods_list}
              {foreach from=$goods_list item=goods}
              <table width="100%" >
                <tr>
                  <td colspan="3">{if $goods.brand_name}[{$goods.brand_name}]{/if}{$goods.goods_name}<span class="attr">{$goods.goods_attr}</span></td>
                </tr>
                <tr>
                  <td>{$goods.formated_goods_price} X <span>{$goods.goods_number}（数量）</span></td>
                  <td>库存：{$goods.storage}</td>
                  <td>小计：{$goods.formated_subtotal}</td>
                </tr>
              </table>
              {/foreach}
              {else}
              <table width="100%" >
                <tr>
                  <td colspan="3"><span class="attr">没有任何商品！</span></td>
                </tr>
              </table>
              {/if}
            </div>
          </div>
          <div class="order_base">
            <p class="edit" id="order_base"  onclick='$(".base_info_one").slideToggle()'><span>基本信息</span> <i></i></p>
            <div class="base_info_one">
              <p>订单号：{$order.order_sn}</p>
              <p>购货人：{$order.user_name} <a href="javascript:open_surplus();" class="">购货人信息</a><a href="user_msg.php?act=add&order_id={$order.order_id}&user_id={$order.user_id}">{$lang.send_message}</a></p>
              <p>下单时间：{$order.formated_add_time}</p>
              <p>付款时间：{if $order.pay_time gt 0}{$order.formatted_pay_time}{else}未支付{/if}</p>
              <p>发货时间：{if $order.shipping_time gt 0}{$order.formatted_shipping_time}{else}未收货{/if}</p>
            </div>
            <div class="base_info">
              <p>订单状态：{$lang.os[$order.order_status]},{$lang.ps[$order.pay_status]},{$lang.ss[$order.shipping_status]}</p>
              <p>支付方式：{$order.pay_name}<a href="order.php?act=edit&order_id={$order.order_id}&step=payment" class="special">编辑</a></p>
              <p>配送方式：{$order.shipping_name}<a href="order.php?act=edit&order_id={$order.order_id}&step=shipping" class="special">编辑</a></p>
              <!--如果配送方式是“门店自提”，则显示以下自提点 star-->
              {if $order.is_pickup eq 1 && $order.pickup_point gt 0}
              <p>所选自提点：[{$order.pickup_point_info.province_name}&nbsp;{$order.pickup_point_info.city_name}&nbsp;{$order.pickup_point_info.district_name}&nbsp;{$order.pickup_point_info.address}]{$order.pickup_point_info.shop_name}</p>
              {/if}
              <!--如果配送方式是“门店自提”，则显示以下自提点 end-->
              {if $order.invoice_no gt 0}
              <p>发货单号：{$order.invoice_no}</p>
              {/if}
            </div>
          </div>
          <div class="order_qita">
            <p class="edit" id="order_qita"  onclick='$(".qita_info").slideToggle()'>
              <span>其他信息
              {if $order.inv_type}
              <a href="" class="special">{$lang[$order.inv_type]}</a>
              {/if}
              </span>
              <i></i>
            </p>
            <div class="qita_info">
              <!--{如果有普通发票 start*}-->
              {if $order.inv_type}
              <p>发票类型：{$lang[$order.inv_type]}</p>
              {/if}
              {if $order.inv_type eq 'normal_invoice'}
              <p>发票抬头：{$order.inv_payee}</p>
              <p>发票内容：{$order.inv_content}</p>
              {elseif $order.inv_type eq 'vat_invoice'}
              <h4>公司信息：</h4>
              <p>单位名称：{$order.vat_inv_company_name}</p>
              <p>纳税人识别号：{$order.vat_inv_taxpayer_id}</p>
              <p>注册地址：{$order.vat_inv_registration_address}</p>
              <p>注册电话：{$order.vat_inv_registration_phone}</p>
              <p>开户银行：{$order.vat_inv_deposit_bank}</p>
              <p>银行账户：{$order.vat_inv_bank_account}</p>
              <h4>收票人信息：</h4>
              <p>收票人姓名：{$order.inv_consignee_name}</p>
              <p>收票人手机：{$order.inv_consignee_phone}</p>
              <p>收票人地址：[{$order.inv_consignee_province_name}&nbsp;{$order.inv_consignee_city_name}&nbsp;{$order.inv_consignee_district_name}]{$order.inv_consignee_address}</p>
              {/if}
              <!--{如果有发票 end }-->
              {if $order.postscript}
              <p>客户给商家的留言：{$order.postscript}</p>
              {/if}
              <p>缺货处理：等待商家备齐后再发</p>
              {if $order.to_buyer}
              <p>商家给客户的留言：{$order.to_buyer}</p>
              {/if}
            </div>
          </div>
            
            <div class="order_history">
            <p class="edit" id="order_history"  onclick='$(".history_info").slideToggle()'>
              <span>操作 </span>
              <i></i>
            </p>
            <div class="history_info">
                <table width='100%'>
                    <tr>
                        <th>操作者</th>
                       <!-- <th>操作时间</th>-->
                        <th>订单状态</th>
                        <th>付款状态</th>
                        <th>发货状态</th>
                    </tr>
              {foreach from=$action_list item=action}
                <tr>
                  <td><div align="center">{$action.action_user}</div></td>
                 <!-- <td><div align="center">{$action.action_time}</div></td>-->
                  <td><div align="center">{$action.order_status}</div></td>
                  <td><div align="center">{$action.pay_status}</div></td>
                  <td><div align="center">{$action.shipping_status}</div></td>
                  <td>{$action.action_note|nl2br}</td>
                </tr>
            {/foreach}
                </table>
        </div>
       </div>
      </section>
      {include file='page_footer.htm'}
      {if $full_page eq 1}
    </div>
    {include file='static_div.htm'}
  </body>
</html>
{/if}